package org.wz.complex.work.mapper.auth.sysinfo;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.wz.complex.work.bean.Abc;
import org.wz.complex.work.entity.auth.sysinfo.SysinfoMenu;

@Mapper
public interface SysinfoMenuMapper extends BaseMapper<SysinfoMenu> {

    @Select("""
            SELECT id as cid, pid as bid, sysinfo_micro_id as aid FROM auth_sysinfo_menu WHERE pid =  ( 
            SELECT id FROM auth_sysinfo_menu WHERE sysinfo_micro_id = ( 
            SELECT id FROM auth_sysinfo_micro WHERE route = #{abc.a}  limit 1 
            ) and url = #{abc.b} limit 1 
            ) and url = #{abc.c}
            limit 1 
    """)
    Abc getMenuByAbc(@Param("abc") Abc abc);

}
